package server.gui;

import java.util.Timer;
import java.util.TimerTask;


public class StatusChangeTimer {
	private Timer timer;
	private String msg;
	private MorcGUI gui;
	
	public StatusChangeTimer(MorcGUI gui, int seconds, String msg) {
		this.gui = gui;
		this.msg = msg;
		this.timer = new Timer();
		this.timer.schedule(new CustomStatusTask(), seconds*1000);
	}
	
	private class CustomStatusTask extends TimerTask {

		public void run() {
			StatusChangeTimer.this.gui.setEvent(msg);
		}
	}
}
